function map = vm_map_ed(src_img, blk_w, blk_h)
% VM_MAP: create a map of masking for source image
% TuanND
% 04/03
alpha1 = 0.1;
alpha2 = 0.2;
alpha3 = 0.3;
bw = edge(src_img, 'canny');
bw_list = vm_im2blk(bw, blk_w, blk_h);
[brows bcols] = size(bw_list);
blk_type = zeros(brows, bcols);
for i = 1:brows
    for j = 1:bcols
        blk_bw = bw_list{i,j};
        p_edge = sum(blk_bw(:))/(blk_w * blk_h);
        if p_edge <= alpha1
            blk_type(i,j) = 0;
        elseif p_edge <= alpha2
            blk_type(i,j) = 1;
        elseif p_edge <= alpha3
            blk_type(i,j) = 2;
        else
            blk_type(i,j) = 3;
        end
    end
end
%build the map from block classification
map = vm_maprender(src_img, bw_list, blk_type);
end